// DisplayController.h: interface for the DisplayController class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_DISPLAYCONTROLLER_H__BE7B8F52_0579_4D61_88BD_EE8368D1E1FD__INCLUDED_)
#define AFX_DISPLAYCONTROLLER_H__BE7B8F52_0579_4D61_88BD_EE8368D1E1FD__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "StructureAndConst.h"
class GameMap;
class DisplayController  
{
public:
	DisplayController();
	virtual ~DisplayController();
	static bool Initialize(HWND hwnd,BOOL bWindowed);
	static bool Uninitialize();
//	static LRESULT CALLBACK WindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);  
	static bool InitGameMap(GameMap* pGameMap);
	static LPDIRECT3DTEXTURE9 CreateTex( PicIdx_t pt, const Pic_t& stPic );
	static void MsgLoop();
	static RanderState_e m_eRanderState;
private:
	static void render(DWORD dCurrentTime);
	static bool InitializeD3D(HWND hwnd,BOOL bWindowed);
	//static D3DFORMAT CheckDisplayMode(UINT nWidth, UINT nHeight, UINT nDepth);
	static LPDIRECT3DDEVICE9 m_pd3dDevice;
	static LPDIRECT3D9 m_pD3D; 
	static HANDLE m_hThread;
	static HWND m_hWnd;
	static GameMap* m_pCurrentGameMap;
	static map<PicIdx_t,LPDIRECT3DTEXTURE9> m_mapIndexToTex;
    static POINT ptLastMousePosit;   
    static POINT ptCurrentMousePosit;   
    static bool bMousing;   
};

#endif // !defined(AFX_DISPLAYCONTROLLER_H__BE7B8F52_0579_4D61_88BD_EE8368D1E1FD__INCLUDED_)
